public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree=new TestBinaryTree();
        TestBinaryTree.TreeNode root=testBinaryTree.createTree();
        testBinaryTree.preOrder(root);
        testBinaryTree.preOrderNot(root);

        System.out.println();
        testBinaryTree.inOrder(root);
        testBinaryTree.inOrderNot(root);


        System.out.println();
        testBinaryTree.postOrder(root);
        testBinaryTree.postOrderNot(root);
        System.out.println();

        System.out.println("=====节点个数====");
        System.out.println(testBinaryTree.size(root));
        testBinaryTree.size2(root);
        System.out.println(TestBinaryTree.nodeSize);

        System.out.println("===叶子节点个数====");
        System.out.println(testBinaryTree.getLeafNodeCount(root));
        testBinaryTree.getLeafNodeCount2(root);
        System.out.println(testBinaryTree.leafSize);

        System.out.println("===树的高度==");
        System.out.println(testBinaryTree.getHeight(root));

        System.out.println("找值为val的节点====");
        System.out.println(testBinaryTree.find(root,'H').val);

        System.out.println("===层序遍历==");
        testBinaryTree.levelOrder(root);

        System.out.println("===测试是否是完全二叉树=");
        System.out.println(testBinaryTree.isCompleteTree(root));

    }
}
